package com.tangruojie.stream;

import com.tangruojie.entity.Author;

import java.util.List;

/**
 * 终结操作之 forEach 遍历
 */
public class StreamDemo09 {

    public static void main(String[] args) {

        List<Author> authors = StreamDemoTest.getAuthors();

        authors.stream().distinct().forEach(author -> System.out.println(author.getName()));

    }

}
